import request from "@/utils/request";

export function listData(
  { page, page_size },
  {
    user_code,
    nickname,
    room_name,
    type,
    is_rain,
    rush_start_time,
    rush_end_time,
    pause_start_time,
    pause_end_time,
    start_time,
    end_time
  }
) {
  return request({
    url: `/hongbao/info`,
    method: "get",
    params: {
      page,
      page_size,
      user_code,
      nickname,
      room_name,
      type,
      is_rain,
      rush_start_time,
      rush_end_time,
      pause_start_time,
      pause_end_time,
      start_time,
      end_time
    }
  });
}

export function detailData(
  { page, page_size },
  { user_code, nickname, room_name, game_id, start_time, end_time }
) {
  return request({
    url: `/hongbao/record`,
    method: "get",
    params: {
      page,
      page_size,
      user_code,
      nickname,
      room_name,
      game_id,
      start_time,
      end_time
    }
  });
}
